home *** CD-ROM | disk | FTP | other *** search
/ Input 64 / Input_64_87-06_1987_Verlag_Heinz_Weise_de.d64 / einer gegen 1 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  546b  |  43 lines

  1. 1000 rem aufloesung einer gegen alle 3/87
  2. 1010 :
  3. 1020 print"[147]"
  4. 1030 dim w(200)
  5. 1040 :
  6. 1050 print : input e$
  7. 1060 :
  8. 1070 rem chiffrierung
  9. 1080 :
  10. 1090 le=len(e$)
  11. 1100 of=int(rnd(1)*50)+10
  12. 1120 w(0)=le*2+1
  13. 1130 w(1)=of*2
  14. 1140 :
  15. 1150 z=1
  16. 1160 for i=le to 1 step-1
  17. 1170 z=z+1
  18. 1180 w(z)=asc(mid$(e$,i,1))+of
  19. 1190 z=z+1
  20. 1200 w(z)=int(rnd(1)*250)+1
  21. 1210 nexti
  22. 1220 :
  23. 1230 rem ausgabe der codierung
  24. 1240 :
  25. 1250 print
  26. 1260 for i=0 to w(0)
  27. 1270 printw(i),
  28. 1280 next i
  29. 1290 :
  30. 1300 rem dechiffrierung und ausgabe
  31. 1310 :
  32. 1320 an=w(0)-1
  33. 1330 of=w(1)/2
  34. 1340 :
  35. 1350 print:print:print"> ";
  36. 1360 for i=an to 2 step-2
  37. 1370 ch=w(i)-of
  38. 1380 print chr$(ch);
  39. 1390 nexti
  40. 1400 print
  41. 1410 :
  42. 1420 goto 1050
  43.